Crafting Interpreters

Crafting Interpreters

  • Downloads:3246
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2021-07-31 09:21:09
  • Update Date:2025-09-06
  • Status:finish
  • Author:Robert Nystrom
  • ISBN:B09BCCVLCL
  • Environment:PC/Android/iPhone/iPad/Kindle

Reviews

JP

Programming languages are something of a hobby of mine。 Going as far back as undergrad, I’ve written a fair few interpreters and compilers over the years。 I’ve never really gotten beyond a strong basic level, but I’ve always wanted to。 Crafting Interpreters is a great book for exactly that。 The book essentially walks you through two styles of interpreter of the same language: just an AST walking style written in Java (the sort I’ve done a few times) and then a much more optimized one based on by Programming languages are something of a hobby of mine。 Going as far back as undergrad, I’ve written a fair few interpreters and compilers over the years。 I’ve never really gotten beyond a strong basic level, but I’ve always wanted to。 Crafting Interpreters is a great book for exactly that。 The book essentially walks you through two styles of interpreter of the same language: just an AST walking style written in Java (the sort I’ve done a few times) and then a much more optimized one based on bytecode。 There was something to learn on both sections though, since the the introduced language (lox) includes higher order functions and closures—certainly more interesting bits of languages to implement。 The latter really was the more interesting to me and really makes me want to go out and try building something more like that。 I think they biggest weakness of the book was in some ways also a strength: the author wrote all the code for the book before writing the prose—and then made sure that the book contained every line of the final interpreters。 That does lead to some rather repetitive sections of adding very similar code to each new function, but so it goes。 Overall, well worth the read if you’re into programming languages, or really programming in general。 。。。more

Zach

This was recommended by a co-worker to whom I had made clear that I didn't quite understand the difference between bytecode and native code or exactly what WASM is。 I can now say I do understand these things and that I could probably write a compiler if so compelled。 Like so many things in computing, compilation appears to be a black art only the most hard-core geniuses could understand until you learn just a little bit about it。So this book is great for demystification, but it's quite long and This was recommended by a co-worker to whom I had made clear that I didn't quite understand the difference between bytecode and native code or exactly what WASM is。 I can now say I do understand these things and that I could probably write a compiler if so compelled。 Like so many things in computing, compilation appears to be a black art only the most hard-core geniuses could understand until you learn just a little bit about it。So this book is great for demystification, but it's quite long and in need of an editor。 It hasn't been published, after all, but do we really need a chapter about how to write a hash table? I soon stopped reading the asides and only made it about halfway through the C compiler。 I don't think it makes sense to describe every line of code, although the book-as-code aspect of this project is pretty amazing。 I found myself skimming through the chapters to understand what the new concept being presented was, then reading through the code, and going back to the text if there was anything I missed。I'm glad I spent some time with this, but I suppose that high level programming languages are a layer of abstraction I'm happy to not dive too deeply into。 。。。more

Kirill

This is a great introduction to writing an interpreter。 It start with the simple Java implementation, goes on to implement a virtual machine and then concludes by re-implementing everything in C with focus on performance。 You will see chapters going through implementation of advanced features such as closures and OOP with inheritance。In comparison to the famous Dragon Book this is a lot more practical reading。 The book goes through every line of code, do not excluding anything。 Despite of this, This is a great introduction to writing an interpreter。 It start with the simple Java implementation, goes on to implement a virtual machine and then concludes by re-implementing everything in C with focus on performance。 You will see chapters going through implementation of advanced features such as closures and OOP with inheritance。In comparison to the famous Dragon Book this is a lot more practical reading。 The book goes through every line of code, do not excluding anything。 Despite of this, all of it is a pleasure to read。 Author delivers material with humor and sprinkles every chapter with hand drawn illustrations which I adored。Do not miss this book if you have any interest in programming language implementation。 。。。more

Omar Zaki

Just think about the amount of dedication and self discipline you need to have to produce something like that

Neil

Damn :o http://journal。stuffwithstuff。com/202。。。 Damn :o http://journal。stuffwithstuff。com/202。。。 。。。more

Amr Hesham

Amazing book to learn and practice about interpreter, Compiler, Virtual Machine